﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace House_Control
{
    //This class will store all messages given to it by an alarm for referncing at a later date.
    public class Log
    {
        //This is the string that we will use to store the log.
        List<string> log;

        public Log()
        {
            log = new List<string>();
        }

        /* 
         * The idea for this log is that everything is in one big string, this method just adds to the string.
         * By convention, we should every new entry with the new line character. And the formatting should be
         * as follows: [DateTime] message
         */
        public void append(string newEvent){
            log.Add(DateTime.Now + ": " + newEvent);
        }

        public List<string> getLog()
        {
            return log;
        }
    }
}
